capture log close
log using replica_fig6_def_fig_1.log,replace


*       REPLICA_FIG6_DEF_FIG_1.LOG

*       FIRST VERSION   JANUARY 17, 2010
*       THIS VERSION    AUGUST 12, 2012

*       LAST REVISOR    AI

*       INPUT FILE:             DEFIANCE_FIGURE_1.RAW
*       OUTPUT FILE:            FINAL FIGURE FOR DEFIANCE
*				WITH DATA FROM ENRICO
* 		
* 				REPLICATION FIGURE 6


version 9.0

di "log file printed on $S_DATE at $S_TIME"


set more 1
clear
program drop _all
macro drop _all
scalar drop _all

# delimit ;

set scheme s1color;
set memory 300000; 
set matsize 250;
tempfile tmpf1 tmpf2 tmpf3 tmpf4;


infile disc x y yl yh using defiance_fig_dat_2.raw;

label var  x "Income in 1000 euros";
label var y "CDF difference";





twoway (rarea yl yh x if disc==2 ,  color(gs10)) (line y x if disc==2, lcolor(black)) , yline(0,lpattern(dash) lcolor(gs5)) ylabel(-0.4(0.1)0.3) xlabel(0(1)7) title("Discontinuity 2") l1("CDF difference") legend(off) saving(fig_cross_2, replace);

twoway (rarea yl yh x if disc==7 ,  color(gs10)) (line y x if disc==7, lcolor(black)) , yline(0,lpattern(dash) lcolor(gs5)) ylabel(-0.8(0.1)0.6) xlabel(0(1)7) title("Discontinuity 7") l1("CDF difference") legend(off) saving(fig_cross_7, replace);


*gr combine fig_cross_2.gph  fig_cross_7.gph ,  saving(fig_cross, replace);
*graph export fig_cross.eps, replace logo(off);

gr combine fig_cross_2.gph  fig_cross_7.gph ,  saving(fig_6, replace);
graph export fig_6.eps, replace logo(off);






log close;



